<?php
/*
	获取活动详情
*/
defined('BY_JYA') or exit('error');
list($goods_id,$active_id)=$arguments;
$info=pdo_get('jy_exchange_group',array('id'=>$active_id));
$code=pdo_get('jy_exchange_code',array('status'=>1,'groupid'=>$active_id,'mid'=>$_SESSION['uid']));
$goods=json_decode($info['goods'],true);
if($code){
	foreach($goods as $v){
		if($v['goodsid']==$goods_id){
			$isgoods=true;
			$price=$v['price'];
			$oldprice=$v['oldprice'];
		}
	}
	if($isgoods){
		$res=array(
			'title'=>$info['title'],
			'price'=>$price,
			'oldprice'=>$oldprice,
			'isfree'=>true,
		);
	}else{
		return false;
	}
}else{
	return false;
}
return $res;